import request from "@/utils/request";

// 本年累计生产
export function totalProduction(params) {
  return request({
    url: "/overview/totalProduction",
    method: "get",
    params
  });
}
// 本年累计销售
export function totalSales(params) {
  return request({
    url: "/overview/totalSales",
    method: "get",
    params
  });
}
// 本年累计销售
export function productionDays(params) {
  return request({
    url: "/overview/productionDays",
    method: "get",
    params
  });
}
// 本年累计用电
export function totalPower(params) {
  return request({
    url: "/overview/totalPower",
    method: "get",
    params
  });
}
// 本年隐患整改数
export function hiddenDanger(params) {
  return request({
    url: "/overview/hiddenDanger",
    method: "get",
    params
  });
}

// 获取每月生产数据折线图
export function productionline(params) {
  return request({
    url: "/overview/production/line",
    method: "get",
    params
  });
}
// 获取生产数据饼状图
export function productionpie(params) {
  return request({
    url: "/overview/production/pie",
    method: "get",
    params
  });
}
// 获取每月销售数据折线图
export function salesline(params) {
  return request({
    url: "/overview/sales/line",
    method: "get",
    params
  });
}
// 获取销售数据饼状图
export function salespie(params) {
  return request({
    url: "/overview/sales/pie",
    method: "get",
    params
  });
}

// 获取主要设备运行数据折线图
export function equipmentline(params) {
  return request({
    url: "/overview/equipment/line",
    method: "get",
    params
  });
}
// 获取设备运行数据饼状图
export function equipmentpie(params) {
  return request({
    url: "/overview/equipment/pie",
    method: "get",
    params
  });
}

// 月度总用电折线图
export function electricline(params) {
  return request({
    url: "/overview/electric/line",
    method: "get",
    params
  });
}
// 每个车间用电饼状图
export function electricpie(params) {
  return request({
    url: "/overview/electric/pie",
    method: "get",
    params
  });
}

// 安全环保月度巡检折线图
export function inspectionline(params) {
  return request({
    url: "/overview/inspection/line",
    method: "get",
    params
  });
}
// 隐患区间（车间）分布饼状图
export function workshoppie(params) {
  return request({
    url: "/overview/hazard/workshop/pie",
    method: "get",
    params
  });
}
// 隐患级别分布饼状图
export function levelpie(params) {
  return request({
    url: "/overview/hazard/level/pie",
    method: "get",
    params
  });
}

// 月度隐患折线图
export function hazardline(params) {
  return request({
    url: "/overview/hazard/line",
    method: "get",
    params
  });
}

// 隐患类型分布饼状图
export function hazardtypepie(params) {
  return request({
    url: "/overview/hazard/type/pie",
    method: "get",
    params
  });
}
// 三违类型分布饼状图
export function violationpie(params) {
  return request({
    url: "/overview/violation/type/pie",
    method: "get",
    params
  });
}
// 月度备件折线图（托辊、0-5筛网、5-10筛网）
export function spareline(params) {
  return request({
    url: "/overview/spare/line",
    method: "get",
    params
  });
}
// 月度备件领用折线图（总数量、总金额）
export function usageline(params) {
  return request({
    url: "/overview/spare/usage/line",
    method: "get",
    params
  });
}

// 生产分析
// 1.获取本年、去年产量与环比数据
export function compare(params) {
  return request({
    url: "/production/production/compare",
    method: "get",
    params
  });
}
// 2.获取本季产量、上季度产量及环比数据
export function quarter(params) {
  return request({
    url: "/production/production/quarter",
    method: "get",
    params
  });
}
// 3.获取本月、上月产量与环比数据
export function monthCompare(params) {
  return request({
    url: "/production/production/monthCompare",
    method: "get",
    params
  });
}

// 4.获取昨日、前日产量与环比数据
export function dayCompare(params) {
  return request({
    url: "/production/production/dayCompare",
    method: "get",
    params
  });
}

// 5 获取柱状图月数据
export function barDataDynamic(params) {
  return request({
    url: "/production/production/barDataDynamic",
    method: "get",
    params
  });
}

//6.本月各产品产量分布饼状图
export function pieData(params) {
  return request({
    url: "/production/production/pieData",
    method: "get",
    params
  });
}
//7.本月各产品产量分布饼状图
export function pieDataYesterday(params) {
  return request({
    url: "/production/production/pieDataYesterday",
    method: "get",
    params
  });
}


// 销售分析
//1.本年获取产销统计数据
export function salesSummary(params) {
  return request({
    url: "/market/production/salesSummary",
    method: "get",
    params
  });
}
//2.获取本月产销统计数据
export function monthlySalesSummary(params) {
  return request({
    url: "/market/production/monthlySalesSummary",
    method: "get",
    params
  });
}
//3.获取昨日产销统计数据
export function dailySalesSummary(params) {
  return request({
    url: "/market/production/dailySalesSummary",
    method: "get",
    params
  });
}
//4.本月各产品每日销量柱状图数据
export function monthlyProductSales(params) {
  return request({
    url: "/market/production/monthlyProductSales",
    method: "get",
    params
  });
}
//5.本月各产品销量分布饼状图
export function monthlyProductPie(params) {
  return request({
    url: "/market/production/monthlyProductPie",
    method: "get",
    params
  });
}
//6.昨日各产品销量分布饼状图
export function dailyProductPie(params) {
  return request({
    url: "/market/production/dailyProductPie",
    method: "get",
    params
  });
}

// 安环分析
// 1.获取本年、本月计划-实际检查数据
export function checkData(params) {
  return request({
    url: "/ecological/safety/checkData",
    method: "get",
    params
  });
}
// 2.获取本年、本月隐患发现-整改数据
export function hazardData(params) {
  return request({
    url: "/ecological/safety/hazardData",
    method: "get",
    params
  });
}
// 3.获取本年、本月特种作业完成次数
export function specialOperation(params) {
  return request({
    url: "/ecological/safety/specialOperation",
    method: "get",
    params
  });
}
// .获取临时设备证照和历史企业证照数量
export function count(params) {
  return request({
    url: "/ecological/certificate/count",
    method: "get",
    params
  });
}
// 5.获取各区域隐患统计列表
export function regionList(params) {
  return request({
    url: "/ecological/safety/hazard/regionList",
    method: "get",
    params
  });
}
// 6.本月环境监测折线图数据（PM10, PM2.5, 噪音, 湿度）
export function monthLine(params) {
  return request({
    url: "/ecological/environment/monthLine",
    method: "get",
    params
  });
}
//7.获取本年隐患位置分布饼状图数据
export function locationPie(params) {
  return request({
    url: "/ecological/safety/hazard/locationPie",
    method: "get",
    params
  });
}
//8.本年隐患来源分布饼状图
export function sourcePie(params) {
  return request({
    url: "/ecological/safety/hazard/sourcePie",
    method: "get",
    params
  });
}
//9.本年隐患级别分布饼状图
export function levelPie(params) {
  return request({
    url: "/ecological/safety/hazard/levelPie",
    method: "get",
    params
  });
}
//10.本年特种作业分布饼状图
export function specialOperationPie(params) {
  return request({
    url: "/ecological/safety/specialOperationPie",
    method: "get",
    params
  });
}
//.获取隐患详情列表
export function details(params) {
  return request({
    url: "/ecological/safety/hazard/details",
    method: "get",
    params
  });
}



export function ssologin(params) {
  return request({
    url: "/sso/login",
    method: "get",
    params
  });
}